﻿<Window x:Class="WPF.Themes.Demo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:themes="clr-namespace:WPF.Themes;assembly=WPF.Themes"
    themes:ThemeManager.Theme="{Binding ElementName=themes, Path=SelectedItem}"
    Loaded="Window_Loaded"
    Background="{DynamicResource WindowBackgroundBrush}"
        SizeToContent="Height"
    Title="WPF.Themes" MinHeight="330" Width="732">
    <StackPanel>
        <Border Background="White" Height="30" BorderBrush="Black" BorderThickness="0,0,0,1">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
                <TextBlock Text="Theme: " Margin="5,0,0,0"   />
                <ComboBox x:Name="themes" Width="150" Height="20" SelectionChanged="themes_SelectionChanged" SelectedIndex="0" />
            </StackPanel>
        </Border>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <StackPanel Margin="10,10,10,10" Grid.Column="1">
                <ComboBox Height="22" Margin="0,0,0,5" x:Name="comboBox" DisplayMemberPath="Name" SelectedIndex="0" />
                <ListBox Height="220" x:Name="listBox" DisplayMemberPath="Name" />
            </StackPanel>
            <StackPanel Margin="10,10,10,10" Grid.Column="0">
                <Button Content="Button" Margin="0,0,0,2.5" Height="22" />
                <ToggleButton Content="ToggleButton" Margin="0,0,0,5" Height="22" />
                <CheckBox Content="CheckBox" IsChecked="True"/>
                <CheckBox Content="CheckBox - Three State" IsThreeState="True" IsChecked="{x:Null}" />
                <CheckBox Content="CheckBox - Disabled" IsEnabled="False" Margin="0,0,0,5" />

                <RadioButton Content="RadioButton" IsChecked="True"/>
                <RadioButton Content="RadioButton" />
                <RadioButton Content="RadioButton - Disabled" IsEnabled="False" Margin="0,0,0,5" />

                <Slider x:Name="slider" Minimum="0" Maximum="100" Value="50" Margin="0,0,0,2.5" />
                <ProgressBar IsIndeterminate="True" Height="22" Margin="0,0,0,2.5"/>
                <ProgressBar Minimum="0" Maximum="100" Value="{Binding ElementName=slider, Path=Value}" Height="22" Margin="0,0,0,5" />

                <TextBox Text="TextBox" />
            </StackPanel>

            <TabControl Grid.Column="2">
                <TabItem Header="Tab #1">
                    <Grid>
                        <Expander IsExpanded="True" Header="Expander" Margin="8,8,8,8">
                            <TreeView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="215"  >
                                <TreeViewItem Header="TreeViewItem #1"/>
                                <TreeViewItem Header="TreeViewItem #2" IsExpanded="True">
                                    <TreeViewItem Header="TreeViewItem #3"/>
                                    <TreeViewItem Header="TreeViewItem #4"/>
                                </TreeViewItem>
                                <TreeViewItem Header="TreeViewItem #5"/>
                                <TreeViewItem Header="TreeViewItem #6">
                                    <TreeViewItem Header="TreeViewItem #7">
                                        <TreeViewItem Header="TreeViewItem #8"/>
                                        <TreeViewItem Header="TreeViewItem #9"/>
                                    </TreeViewItem>
                                </TreeViewItem>
                            </TreeView>
                        </Expander>
                    </Grid>
                </TabItem>
                <TabItem Header="Tab #2">
                    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                        <TextBlock Text="Item #1" />
                        <TextBlock Text="Item #2" />
                        <TextBlock Text="Item #3" />
                        <TextBlock Text="Item #4" />
                    </StackPanel>
                </TabItem>

            </TabControl>
        </Grid>
    </StackPanel>
</Window>
